#ifndef __RSRCMGR_H__
#define __RSRCMGR_H__

#include "../../Header/Header.h"
#include "ResourceBank.h"

typedef enum
{
	RESOURCE_NULL,
	RESOURCE_SHADER,
	RESOURCE_MESH,
	RESOURCE_TEXTURE,
	RESOURCE_VIDEO,
	RESOURCE_AUDIO,
	RESOURCE_MATERIAL,
	RESOURCE_EFFECT,
}RESOURCE_TYPE;

class ResourceManagement
{
private:
	static ResourceManagement* m_bInstance;
protected:
	ResourceBank* m_ShaderBank;
	ResourceBank* m_MeshBank;
	ResourceBank* m_TextureBank;
	ResourceBank* m_AudioBank;
	ResourceBank* m_VideoBank;
	ResourceBank* m_MaterialBank;
	ResourceBank* m_EffectBank;
private:
	ResourceManagement();
public:
	~ResourceManagement();
	static ResourceManagement* GetInstance()
	{
		if (!m_bInstance)
			m_bInstance = new ResourceManagement();
		return m_bInstance;
	}

	//Load file specification all resource in game
	//It must be call first
	void Init(char* strFileSpect);

	//Load resource follow scene
	void Load(/*...ID Scene...*/); //Struct or orther resource load

	void Add(RESOURCE_TYPE type, Resource* element);
	Resource* Reference(RESOURCE_TYPE type, int index);
	void Dereference(RESOURCE_TYPE type, int index);
};

#endif